-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support API token for scanning hf://
#17682
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17682 +/- ##
==========================================
+ Coverage 80.37% 80.40% +0.02%
==========================================
Files 1500 1500
Lines 196605 196640 +35
Branches 2793 2793
==========================================
+ Hits 158016 158103 +87
+ Misses 38076 38024 -52
Partials 513 513 ☔ View full report in Codecov by Sentry. |
Thanks for the fast implementation. Just a nit comment: do you think the parameter could be named just "token"? It seems a bit redundant to call it "hf_token" when it is already passed to the "hf://" URL... |
hf_token
for scanning hf://
hf://
Can we add an entry in the docstring for discoverability? (Aside from the user guide) |
@@ -59,12 +59,14 @@ def read_parquet( | |||
Parameters | |||
---------- | |||
source | |||
Path to a file or a file-like object (by "file-like object" we refer to objects | |||
Path(s) to a file or directory | |||
When needing to authenticate for scanning cloud locations, see the `storage_options` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update docs for source
to point to cloud options
Adds support for scanning from private repositories with an API token:
or alternatively, using an environment variable
export HF_TOKEN=... python main.py
ref #17625